#ifndef TRACE_TRACE_DRIVER_HPP
#define TRACE_TRACE_DRIVER_HPP

#include "utils/cxx-include.hpp"

#include "core/exception.hpp"
#include "core/log.hpp"

/**
 * \file
 * \ingroup trace
 * cas::TraceDriver declaration.
 */

/**
 * \defgroup trace Trace Driver
 * \brief (1) Parse trace files, (2) Generate traces.
 */

namespace cas
{
    /** \ingroup trace */
    class TraceDriver
    {
    public:
        TraceDriver(std::string path = "");
        virtual ~TraceDriver();

        virtual void setPath(std::string path);
        virtual void readFile();
        virtual size_t dataSize();

    private:
        std::string traceFilePath;

        /**
         * \brief Parsing a single line
         *
         * \param [in] sin istringstream of current line
         * \return \c true if parsing was successful
         */
        virtual bool parseLine(std::istringstream &sin);
    };

} // namespace cas

#endif /* TRACE_TRACE_DRIVER_HPP */
